package pl.edu.agh.thieves.cuckoo;

public class Result {
	private final Egg egg;
	private final double weight;
	private final double value;
	private final int iteration;
	private long time;
	private final double[] graphData;

	public Result(Egg egg, int iteration, long time, double[] data) {
		this.egg = egg;
		weight = egg.getEggWeight();
		value = egg.getEggValue();
		this.iteration = iteration;
		this.time = time;
		graphData = data;
	}

	@Override
	public String toString() {
		return " result found on " + iteration + " iteration. Value=" + value
				+ " weight=" + weight + " time=" + time;
	}

	public Egg getEgg() {
		return egg;
	}

	public void showGraphData() {
		for(int i=0;i<graphData.length;i++)
			System.out.println(i+" "+graphData[i]);
	}
	
	public double[] getGraphData(){
		return graphData;
	}
}
